/**全局样式文件*/
@import url('./thame.less');

.ant-tabs{
    color: @text-label-color;
    .ant-tabs-tab-active{
        background-color: transparent !important;
        .ant-tabs-tab-btn{
            color: @color-primary !important;
        }
    }
}

// 按钮
.ant-btn{
    &+.ant-btn{
        margin-left: 0.5rem;
    }
    &.ant-btn-primary{
        &[disabled]{
            color: @text-light-color;
            border-color: @color-primary;
            opacity: 0.8;
        }
        &:not(.ant-btn-background-ghost){
            background-color: @color-primary;
            &.ant-btn-dangerous{
                background-color: @color-dangerous;
            }
        }
        &.ant-btn-background-ghost{
            border-color: @color-primary;
            color: @color-primary;
            &:not([disabled]):hover{
                background-color: @color-primary;
                border-color: @color-primary;
                color: @text-light-color
            }
            &.ant-btn-dangerous{
                border-color: @color-dangerous;
                color: @color-dangerous;
                &:not([disabled]):hover{
                    background-color: @color-dangerous;
                    color: @text-light-color
                }
            }
        }
    }
    &.ant-btn-default{
        &[disabled]{
            color: @text-light-color;
            opacity: 0.8;
        }
    }
    &.ant-btn-warning{
        background-color: @color-warning;
        color: @text-blank-color;
        &.ant-btn-background-ghost{
            background-color: transparent;
            border-color: @color-warning;
            color: @color-warning;
            &:hover{
                background-color: @color-warning;
                color: @text-blank-color;
            }
        }
    }
}

// 卡片
.ant-card{
    margin-top: 1rem;
    background-color: @bg-blank-light;
    .ant-card-extra{
        display: flex;
        &>* + *{
            margin-left: 1rem;
        }
    }
    .ant-card-head{
        border-bottom-color: transparent;
        .ant-card-head-title{
            color: @text-light-color;
        }
    }
    &.ant-card-small{
        .ant-card-head-wrapper{
            padding-top: 1rem;
            padding-bottom: 0.3rem;
        }
        .ant-card-head-title{
            font-size: 1.3rem;
        }
    }
}

// 加载
.ant-spin {
    .ant-spin-dot-item{
        background-color: @text-label-color;
    }
}

// 空数据
.ant-empty{
    .ant-empty-image{
        opacity: 0.6;
    }
    .ant-empty-description{
        color: @text-label-color;
        opacity: 0.5;
    }
}

// 表格
.ant-table-wrapper {
    background-color: transparent;
    .ant-table{
        background-color: transparent;
    }
    .ant-table-content{
        background-color: @bg-blank-light !important;
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
    }
    .ant-table-header,
    .ant-table-thead{
        border-radius: 0 !important;
        background-color: @bg-blank !important;
    }
    .ant-table-thead {
        .ant-table-cell {
            background-color: @bg-blank !important;
            &:first-child{
                border-start-start-radius: 0 !important;
            }
            &:last-child{
                border-start-end-radius: 0 !important;
            }
        }
        &>tr>th{
            border-bottom-color: @bg-blank !important;
            color: @text-label-color;
            &:not(:last-child)::before{
                background-color: transparent !important;
            }
        }
    }
    .ant-table-tbody{
        .ant-table-cell {
            background-color: inherit !important;
        }
        tr>td{
            border-top-color: @border-color !important;
            color: @text-light-color;
        }
        & >tr:last-child>td{
            border-bottom-color: @bg-blank !important;
        }
        &>tr.ant-table-row:hover>td:first-child{
            border-start-start-radius: 0 !important;
            border-end-start-radius: 0 !important;
        }
        &>tr.ant-table-row:hover>td:last-child{
            border-start-end-radius: 0 !important;
            border-end-end-radius: 0 !important; 
        }
    }
    .ant-pagination{
        background-color: @bg-blank-light;
        margin: 0 !important;
        padding: 16px 0;
    }

    .ant-spin-blur{
        .ant-table-content{
            min-height: 100px;
        }
    }
}

//分页条
.ant-pagination {
    color: @text-light-color !important;
    .ant-pagination-total-text{
        flex: 1;
        min-width: 0;
    }
    .ant-pagination-item-link {
        color: @text-light-color !important;
        &[disabled] {
            opacity: 0.3;
        }
    }

    .ant-pagination-jump-prev .ant-pagination-item-container .ant-pagination-item-ellipsis,
    .ant-pagination-jump-next .ant-pagination-item-container .ant-pagination-item-ellipsis,
    .ant-pagination-jump-prev .ant-pagination-item-container .anticon,
    .ant-pagination-jump-next .ant-pagination-item-container .anticon,
    .ant-pagination-item a {
        color: @text-light-color;
    }

    .ant-pagination-item-active {
        background-color: @text-light-color;

        &,
        &:hover {
            border-color: @color-primary;
        }

        &:hover a,
        a {
            color: @text-blank-color;
        }
    }

}

// 通知栏
.ant-notification{
    z-index: 9000;
}
.ant-notification-notice {
    background-color: @bg-blank-lighter;
    color: @text-light-color;
    padding: 0 1rem 0.5rem;
    display: flex;
    border-radius: 2rem;
    width: auto;
    padding-right: 2.5rem;

    .ant-notification-notice-close {
        top: 0.5rem;
        inset-inline-end: 8px;
    }

    .ant-notification-close-x {
        color: @text-label-color;
    }
}

// 进度条
.ant-progress {
    margin-bottom: 0;

    .ant-progress-inner {
        background-color: rgba(255, 255, 255, .6);
    }

    .ant-progress-bg {
        background-color: #5c7ee5;
        background-size: 1rem 1rem;
        background-image: linear-gradient(45deg,
                rgba(255, 255, 255, 0.15) 25%,
                transparent 25%, transparent 50%,
                rgba(255, 255, 255, 0.15) 50%,
                rgba(255, 255, 255, 0.15) 75%,
                transparent 75%,
                transparent);
    }

    &.ant-progress-status-success {
        .ant-progress-bg {
            background-color: #0aac61;
        }
    }
}

// 弹窗
.ant-modal-root{
    .ant-image-preview-mask,
    .ant-modal-mask {
        backdrop-filter: blur(4px);
        z-index: 1050;
    }
    .ant-modal-wrap{
        z-index: 1050;
    }
    .ant-modal{
        .ant-form:first-child{
            margin-top: 1.5rem;
        }
    }
}


.ant-modal{
    .ant-modal-header,
    .ant-modal-content{
        background-color: @bg-blank-light;
    }
    .anticon,
    .ant-modal-title{
        color: @text-light-color
    }
    .anticon:hover{
        color: @color-primary;
    }
    .ant-modal-content{
        box-shadow: 0 0 0 1px #5c7ee5, 0 1px 2px 3px #1e46bd;
    }

    .ant-modal-confirm-title,
    .ant-modal-confirm-content{
        color: @text-light-color !important;
    }
}

// 表单
.ant-form{
    .ant-form-item,
    .ant-form-item .ant-form-item-label >label{
        color: @text-light-color
    }
    .ant-form-item-extra{
        color: @text-label-color;
        opacity: 0.8;
        font-size: 0.8rem;
    }
    .hidden-input{
        margin-bottom: 0.5rem;
        .ant-form-item-control-input{
            min-height: auto;
        }
        .ant-input {
            display: none;
        }
    }
}
.ant-checkbox-group,
.ant-radio-group{
    width: 100%;
}
.ant-select-selector,
.ant-picker,
.ant-input-number-input,
.ant-input{
    &::placeholder,
    input::placeholder,
    
    .ant-select-selection-placeholder,
    .ant-picker-separator,
    .ant-picker-suffix { 
        color: @text-label-color !important;
        opacity: 0.3; 
    }
}
.ant-select-arrow{
    color: @text-label-color !important;
}
.ant-switch,
.ant-switch:hover:not(.ant-switch-disabled){
    background-color: @text-blank-color;
}
.ant-upload,
.ant-select-selector,
.ant-picker,
.ant-input-number-input,
.ant-input,
.ant-checkbox-wrapper,
.ant-radio-wrapper,
.ant-input-number,
.ant-select-item-option-content,
.ant-input-clear-icon,
.ant-input-password-icon,
.ant-picker .ant-picker-input >input{
    color: @text-light-color !important;
}
.ant-select-selector,
.ant-picker,
.ant-input-number-input,
.ant-input-affix-wrapper,
.ant-input{
    border-color: @border-color !important;
    background-color: @bg-blank !important;
}
.ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload.ant-upload-select{
    border-color: @border-color;
}
.ant-select-single{
    &.ant-select-open {
        .ant-select-selection-item{
            color: inherit;
        }
    }
}
.ant-select-dropdown{
    background-color: #383845 !important;
    .ant-select-item-option-selected {
        background-color: #09090b !important;
    }
}
.ant-upload-list.ant-upload-list-picture-card{
    .ant-upload-list-item{
        border-color: @border-color !important;
    }
}
.ant-upload-list:not(.ant-upload-list-picture-card){
    .ant-upload-list-item{
        background-color: @bg-blank;
        border-color: transparent !important;
        &:hover{
            background-color: @bg-blank !important;
        }
        .ant-upload-list-item-name,
        .ant-upload-list-item-actions .anticon{
            color: @text-label-color !important;
            &:hover{
                cursor: pointer;
                color: @color-primary !important;
            }
        }
    }
    .ant-tooltip{
        display: none;
    }
    .ant-upload-list-item-container{
        height: auto !important;
    }
}

.bg-lighter-popover {
    .ant-popover-inner {
        background-color: @bg-blank-lighter;

    }

    .ant-popover-title,
    .ant-popover-inner-content {
        color: @text-light-color;
    }

    .ant-popover-arrow:before {
        background-color: @bg-blank-lighter;
    }

    .ant-checkbox-group {
        display: flex;
        flex-direction: column;
        color: @text-light-color;
    }
}
